package sk.velkavrana.app.context;

import sk.velkavrana.app.dao.DatabaseService;
import sk.velkavrana.app.dao.impl.DatabaseServiceImpl;
import sk.velkavrana.app.model.ConnectionInfo;
import sk.velkavrana.app.service.ExportService;
import sk.velkavrana.app.service.ImportService;
import sk.velkavrana.app.service.impl.ExportServiceImpl;
import sk.velkavrana.app.service.impl.ImportServiceImpl;

import java.io.File;

/**
 * @author mtymes
 * @since May 19, 2009 12:02:03 PM
 */
public final class Context {

    public static final String VERSION = "v0.1.4 (090922)";

    // todo: currently not used 
    private static final String driverDirectory = "." + File.separator + "drivers";

    private final String importDirectory = "." + File.separator + "import";
    private final String exportDirectory = "." + File.separator + "export";

    private ConnectionInfo connectionInfo = new ConnectionInfo();

    private final DatabaseService databaseService = new DatabaseServiceImpl();
    private final ExportService exportService = new ExportServiceImpl();
    private final ImportService importService = new ImportServiceImpl();


    public String getImportDirectory() {
        return importDirectory;
    }


    public String getExportDirectory() {
        return exportDirectory;
    }


    public ConnectionInfo getConnectionInfoEx() {
        return connectionInfo;
    }


    public void setConnectionInfoEx(ConnectionInfo connectionInfo) {
        this.connectionInfo = connectionInfo;
    }


    public DatabaseService getDatabaseService() {
        return databaseService;
    }


    public ExportService getExportService() {
        return exportService;
    }


    public ImportService getImportService() {
        return importService;
    }


    private Context() {
    }


    public static final Context INSTANCE = new Context();


    public static Context getInstance() {
        return INSTANCE;
    }
}
